home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_500 / wiconify / wiconify-source.lzh / Source / wStubs.a < prev    next >
Text File  |  1991-04-19  |  9KB  |  204 lines

  1.         CSECT       text
  2.  
  3.         XREF        _cOpenWindow
  4.         XREF        _OldOpenWindow
  5.         XREF        _cCloseWindow
  6.         XREF        _OldCloseWindow
  7.         XREF        _cOpenScreen
  8.         XREF        _OldOpenScreen
  9.         XREF        _cCloseScreen
  10.         XREF        _OldCloseScreen
  11.         XREF        _cSetWindowTitles
  12.         XREF        _OldSetWindowTitles
  13.         XREF        _cWindowToFront
  14.         XREF        _OldWindowToFront
  15.         XREF        _cWindowToBack
  16.         XREF        _OldWindowToBack
  17.         XREF        _cActivateWindow
  18.         XREF        _OldActivateWindow
  19.         XREF        _cBuildSysRequest
  20.         XREF        _OldBuildSysRequest
  21.         XREF        _cFreeSysRequest
  22.         XREF        _OldFreeSysRequest
  23.         XREF        _cAutoRequest
  24.         XREF        _OldAutoRequest
  25.  
  26.         XREF        _wHandler
  27.         XDEF        _wHandlerStub
  28.         
  29.         XDEF        _aOpenWindow
  30.         XDEF        _aOldOpenWindow
  31.         XDEF        _aCloseWindow
  32.         XDEF        _aOldCloseWindow
  33.         XDEF        _aOpenScreen
  34.         XDEF        _aCloseScreen
  35.         XDEF        _aOldCloseScreen
  36.         XDEF        _aSetWindowTitles
  37.         XDEF        _aWindowToFront
  38.         XDEF        _aWindowToBack
  39.         XDEF        _aActivateWindow
  40.         XDEF        _aBuildSysRequest
  41.         XDEF        _aOldBuildSysRequest
  42.         XDEF        _aFreeSysRequest
  43.         XDEF        _aOldFreeSysRequest
  44.         XDEF        _aAutoRequest
  45.  
  46. _wHandlerStub:
  47.         MOVEM.L A0/A1,-(SP)
  48.         JSR     _wHandler
  49.         ADDQ.L  #8,SP
  50.         RTS
  51.         
  52. _aOpenWindow:
  53.         MOVEM.L     D2-D7/A0-A6,-(SP)      ; save registers on stack
  54.         MOVE.L      A0,-(SP)               ; push NewWindow pointer
  55.         JSR         _cOpenWindow           ; call our C OpenWindow
  56.         ADDQ.L      #4,SP                  ; pop the pointer
  57.         MOVEM.L     (SP)+,D2-D7/A0-A6      ; restore registers
  58.         RTS
  59.  
  60. _aOldOpenWindow:
  61.         MOVE.L      4(SP),A0               ; move NewWindow pointer to register
  62.         MOVE.L      _OldOpenWindow,A1      ; move old address to A1
  63.         JMP         (A1)                   ; JMP to old OpenWindow routine
  64.  
  65.  
  66. _aCloseWindow:
  67.         MOVEM.L     D0-D7/A0-A6,-(SP)      ; save registers on stack
  68.         MOVE.L      A0,-(SP)               ; push the Window pointer
  69.         JSR         _cCloseWindow          ; call our C CloseWindow
  70.         ADDQ.L      #4,SP                  ; pop the pointer
  71.         MOVEM.L     (SP)+,D0-D7/A0-A6      ; restore registers
  72.         RTS
  73.  
  74. _aOldCloseWindow:
  75.         MOVE.L      4(SP),A0               ; move Window pointer to register
  76.         MOVE.L      _OldCloseWindow,A1     ; move old address to A1
  77.         JMP         (A1)                   ; JMP to old CloseWindow routine
  78.  
  79. _aOpenScreen:
  80.         MOVE.L      _OldOpenScreen,A1      ; move old address to A1
  81.         JSR         (A1)                   ; JMP to old OpenScreen routine
  82.         MOVEM.L     D0-D7/A0-A6,-(SP)      ; save registers on stack
  83.         MOVE.L      D0,-(SP)               ; push the new Screen pointer
  84.         JSR         _cOpenScreen           ; call our C OpenScreen
  85.         ADDQ.L      #4,SP                  ; pop the pointer
  86.         MOVEM.L     (SP)+,D0-D7/A0-A6      ; restore registers
  87.         RTS
  88.  
  89. _aCloseScreen:
  90.         MOVEM.L     D0-D7/A0-A6,-(SP)      ; save registers on stack
  91.         MOVE.L      A0,-(SP)               ; push the Screen pointer
  92.         JSR         _cCloseScreen          ; call our C CloseScreen
  93.         ADDQ.L      #4,SP                  ; pop the pointer
  94.         MOVEM.L     (SP)+,D0-D7/A0-A6      ; restore registers
  95.         RTS
  96.  
  97. _aOldCloseScreen:
  98.         MOVE.L      4(SP),A0               ; move Screen pointer to register
  99.         MOVE.L      _OldCloseScreen,A1     ; move old address to A1
  100.         JMP         (A1)                   ; JMP to old CloseScreen routine
  101.  
  102. _aSetWindowTitles:
  103.         MOVEM.L     D2-D7/A0-A6,-(SP)      ; save registers on stack
  104.         MOVE.L      A2,-(SP)               ; push Screen Title pointer
  105.         MOVE.L      A1,-(SP)               ; push Window Title pointer
  106.         MOVE.L      A0,-(SP)               ; push Window pointer
  107.         MOVE.L      _OldSetWindowTitles,A3 ; move old address to A3
  108.         JSR         (A3)                   ; JMP to old SetWindwoTitles routine
  109.         JSR         _cSetWindowTitles      ; call our C SetWindowTitles
  110.         ADD.L       #12,SP                 ; pop the pointers
  111.         MOVEM.L     (SP)+,D2-D7/A0-A6      ; restore registers
  112.         RTS
  113.  
  114. _aWindowToFront:
  115.         MOVEM.L     D2-D7/A0-A6,-(SP)      ; save registers on stack
  116.         MOVE.L      A0,-(SP)               ; push the Window pointer
  117.         JSR         _cWindowToFront        ; call our C WindowToFront
  118.         ADDQ.L      #4,SP                  ; pop the pointer
  119.         MOVEM.L     (SP)+,D2-D7/A0-A6      ; restore registers
  120.         TST.L       D0                     ; check if OK to move window
  121.         BEQ         W2Frts                 ; skip WindowToFront if not
  122.         MOVE.L      _OldWindowToFront,A1   ; move old address to A1
  123.         JSR         (A1)                   ; JMP to old WindowToFront routine
  124. W2Frts: RTS
  125.  
  126. _aWindowToBack:
  127.         MOVEM.L     D2-D7/A0-A6,-(SP)      ; save registers on stack
  128.         MOVE.L      A0,-(SP)               ; push the Window pointer
  129.         JSR         _cWindowToBack         ; call our C WindowToBack
  130.         ADDQ.L      #4,SP                  ; pop the pointer
  131.         MOVEM.L     (SP)+,D2-D7/A0-A6      ; restore registers
  132.         TST.L       D0                     ; check if OK to move window
  133.         BEQ         W2Brts                 ; skip WindowToBack if not
  134.         MOVE.L      _OldWindowToBack,A1    ; move old address to A1
  135.         JSR         (A1)                   ; JMP to old WindowToBack routine
  136. W2Brts: RTS
  137.  
  138. _aActivateWindow:
  139.         MOVEM.L     D2-D7/A0-A6,-(SP)      ; save registers on stack
  140.         MOVE.L      A0,-(SP)               ; push the Window pointer
  141.         JSR         _cActivateWindow       ; call our C ActivateWindow
  142.         ADDQ.L      #4,SP                  ; pop the pointer
  143.         MOVEM.L     (SP)+,D2-D7/A0-A6      ; restore registers
  144.         TST.L       D0                     ; check if OK to activate
  145.         BEQ         AWrts                  ; skip activation if not
  146.         MOVE.L      _OldActivateWindow,A1  ; move old address to A1
  147.         JSR         (A1)                   ; JMP to old ActivateWindow routine
  148. AWrts:  RTS
  149.  
  150. _aBuildSysRequest:
  151.         MOVEM.L     D2-D7/A0-A6,-(SP)      ; save registers on stack
  152.         MOVE.L      D2,-(SP)               ; push the Height
  153.         MOVE.L      D1,-(SP)               ; push the Width
  154.         MOVE.L      D0,-(SP)               ; push the IDCMP Flags
  155.         MOVE.L      A3,-(SP)               ; push the Negative Text
  156.         MOVE.L      A2,-(SP)               ; push the Positive Text
  157.         MOVE.L      A1,-(SP)               ; push the Body Text
  158.         MOVE.L      A0,-(SP)               ; push Window pointer
  159.         JSR         _cBuildSysRequest      ; call our C BuildSysRequest
  160.         ADD.L       #28,SP                 ; pop the pointers
  161.         MOVEM.L     (SP)+,D2-D7/A0-A6      ; restore registers
  162.         RTS
  163.  
  164. _aOldBuildSysRequest:
  165.         MOVE.L     28(SP),D2               ; move Height to register
  166.         MOVE.L     24(SP),D1               ; move Width to register
  167.         MOVE.L     20(SP),D0               ; move IDCMP flags to register
  168.         MOVE.L     16(SP),A3               ; move Negative Text to register
  169.         MOVE.L     12(SP),A2               ; move Positive Text to register
  170.         MOVE.L      8(SP),A1               ; move Body Text to register
  171.         MOVE.L      4(SP),A0               ; move Window pointer to register
  172.         MOVE.L      _OldBuildSysRequest,A4 ; move old address to A4
  173.         JMP         (A4)                   ; JMP to old BuildSysRequest routine
  174.  
  175. _aFreeSysRequest:
  176.         MOVEM.L     D0-D7/A0-A6,-(SP)      ; save registers on stack
  177.         MOVE.L      A0,-(SP)               ; push the Window pointer
  178.         JSR         _cFreeSysRequest       ; call our C FreeSysRequest
  179.         ADDQ.L      #4,SP                  ; pop the pointer
  180.         MOVEM.L     (SP)+,D0-D7/A0-A6      ; restore registers
  181.         RTS
  182.  
  183. _aOldFreeSysRequest:
  184.         MOVE.L      4(SP),A0               ; move Window pointer to register
  185.         MOVE.L      _OldFreeSysRequest,A1  ; move old address to A1
  186.         JMP         (A1)                   ; JMP to old FreeSysRequest routine
  187.  
  188. _aAutoRequest:
  189.         MOVEM.L     D2-D7/A0-A6,-(SP)      ; save registers on stack
  190.         MOVE.L      D3,-(SP)               ; push the Height
  191.         MOVE.L      D2,-(SP)               ; push the Width
  192.         MOVE.L      D1,-(SP)               ; push the Negative IDCMP Flags
  193.         MOVE.L      D0,-(SP)               ; push the Positive IDCMP Flags
  194.         MOVE.L      A3,-(SP)               ; push the Negative Text
  195.         MOVE.L      A2,-(SP)               ; push the Positive Text
  196.         MOVE.L      A1,-(SP)               ; push the Body Text
  197.         MOVE.L      A0,-(SP)               ; push Window pointer
  198.         JSR         _cAutoRequest          ; call our C AutoRequest
  199.         ADD.L       #32,SP                 ; pop the pointers
  200.         MOVEM.L     (SP)+,D2-D7/A0-A6      ; restore registers
  201.         RTS
  202.  
  203.         END
  204.